// 生成司机数据的辅助函数
export  function generateDrivers() {
  const driverNames = [
    '张三',
    '张伟',
    '张敏',
    '李四',
    '李娜',
    '李强',
    '王五',
    '王芳',
    '王磊',
    '赵六',
    '赵敏',
    '赵刚',
    '孙七',
    '孙丽',
    '孙浩',
    '周八',
    '周婷',
    '周杰',
    '吴九',
    '吴芳',
    '吴勇',
    '郑一',
    '郑梅',
    '郑凯',
    '王二',
    '王静',
    '王鹏',
    '陈三',
    '陈红',
    '陈军',
    '刘四',
    '刘霞',
    '刘洋',
    '杨五',
    '杨柳',
    '杨帆',
  ];

  const emergencyContacts = [
    '李四 13800138001',
    '王五 13800138002',
    '赵六 13800138003',
    '孙七 13800138004',
    '周八 13800138005',
    '吴九 13800138006',
    '郑一 13800138007',
    '王二 13800138008',
    '陈三 13800138009',
    '刘四 13800138010',
    '杨五 13800138011',
    '朱七 13800138012',
  ];

  const drivers = [];
  const baseDriverId = 10_001;

  for (let i = 0; i < 30; i++) {
    const status = i < 25 ? '在职' : '离职'; // 25个在职，5个离职
    const licenseLevel = ['C1', 'B2', 'A1'][Math.floor(Math.random() * 3)];
    const gender = Math.random() > 0.5 ? '男' : '女';

    // 生成随机的初次领证日期（2010-2023年之间）
    const year = Math.floor(Math.random() * 14) + 2010;
    const month = Math.floor(Math.random() * 12) + 1;
    const day = Math.floor(Math.random() * 28) + 1;
    const issueDate = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;

    // 生成随机的创建时间（2018-2024年之间）
    const createYear = Math.floor(Math.random() * 7) + 2018;
    const createMonth = Math.floor(Math.random() * 12) + 1;
    const createDay = Math.floor(Math.random() * 28) + 1;
    const createTime = `${createYear}-${createMonth.toString().padStart(2, '0')}-${createDay.toString().padStart(2, '0')}`;

    // 生成随机的更新时间（最近3年）
    const updateYear = Math.floor(Math.random() * 3) + 2022;
    const updateMonth = Math.floor(Math.random() * 12) + 1;
    const updateDay = Math.floor(Math.random() * 28) + 1;
    const updateTime = `${updateYear}-${updateMonth.toString().padStart(2, '0')}-${updateDay.toString().padStart(2, '0')}`;

    drivers.push({
      driverId: baseDriverId + i,
      fullName: driverNames[i],
      phoneNumber: `13${Math.floor(Math.random() * 900_000_000) + 100_000_000}`, // 生成11位手机号
      passwordHash: '$2a$10$hashedpassword', // 模拟加密字符串
      licenseLevel,
      status,
      gender,
      emergencyContact:
        emergencyContacts[Math.floor(Math.random() * emergencyContacts.length)],
      firstLicenseDate: issueDate,
      createTime,
      updateTime,
    });
  }

  return drivers;
}

// 补贴数据
interface DriverSubsidyItem {
  driverId: number;
  fullName: string;
  phoneNumber: string;
  provinceMileage: number;
  outProvinceMileage: number;
  provinceSubsidyRate: number;
  outProvinceSubsidyRate: number;
  totalSubsidy: number;
  updateTime: string;
}

export interface DriverSubsidyResponse {
  list: DriverSubsidyItem[];
  total: number;
  currentPage: number;
  pageSize: number;
}

// Mock司机基础信息数据
export const mockDriverData = [
  { driverId: 1001, fullName: '张三', phoneNumber: '13800138001' },
  { driverId: 1002, fullName: '李四', phoneNumber: '13800138002' },
  { driverId: 1003, fullName: '王五', phoneNumber: '13800138003' },
  { driverId: 1004, fullName: '赵六', phoneNumber: '13800138004' },
  { driverId: 1005, fullName: '钱七', phoneNumber: '13800138005' },
  { driverId: 1006, fullName: '孙八', phoneNumber: '13800138006' },
  { driverId: 1007, fullName: '周九', phoneNumber: '13800138007' },
  { driverId: 1008, fullName: '吴十', phoneNumber: '13800138008' },
  { driverId: 1009, fullName: '郑十一', phoneNumber: '13800138009' },
  { driverId: 1010, fullName: '陈十二', phoneNumber: '13800138010' },
  { driverId: 1011, fullName: '刘十三', phoneNumber: '13800138011' },
  { driverId: 1012, fullName: '杨十四', phoneNumber: '13800138012' },
  { driverId: 1013, fullName: '黄十五', phoneNumber: '13800138013' },
  { driverId: 1014, fullName: '徐十六', phoneNumber: '13800138014' },
  { driverId: 1015, fullName: '何十七', phoneNumber: '13800138015' },
];

// Mock行驶数据（按月份）- 添加2025年数据
export const mockMileageData = {
  // 2024年数据
  '2024-01': [
    { driverId: 1001, provinceMileage: 2800, outProvinceMileage: 1200 },
    { driverId: 1002, provinceMileage: 3200, outProvinceMileage: 800 },
    { driverId: 1003, provinceMileage: 2500, outProvinceMileage: 1500 },
    { driverId: 1004, provinceMileage: 3500, outProvinceMileage: 1000 },
    { driverId: 1005, provinceMileage: 2900, outProvinceMileage: 1100 },
    { driverId: 1006, provinceMileage: 3100, outProvinceMileage: 900 },
    { driverId: 1007, provinceMileage: 2700, outProvinceMileage: 1300 },
    { driverId: 1008, provinceMileage: 3300, outProvinceMileage: 700 },
    { driverId: 1009, provinceMileage: 2600, outProvinceMileage: 1400 },
    { driverId: 1010, provinceMileage: 3000, outProvinceMileage: 1000 },
    { driverId: 1011, provinceMileage: 2850, outProvinceMileage: 1150 },
    { driverId: 1012, provinceMileage: 3150, outProvinceMileage: 850 },
    { driverId: 1013, provinceMileage: 2950, outProvinceMileage: 1050 },
    { driverId: 1014, provinceMileage: 3250, outProvinceMileage: 750 },
    { driverId: 1015, provinceMileage: 2750, outProvinceMileage: 1250 },
  ],
  '2024-02': [
    { driverId: 1001, provinceMileage: 3000, outProvinceMileage: 1000 },
    { driverId: 1002, provinceMileage: 3400, outProvinceMileage: 600 },
    { driverId: 1003, provinceMileage: 2700, outProvinceMileage: 1300 },
    { driverId: 1004, provinceMileage: 3600, outProvinceMileage: 900 },
    { driverId: 1005, provinceMileage: 3100, outProvinceMileage: 900 },
    { driverId: 1006, provinceMileage: 3300, outProvinceMileage: 700 },
    { driverId: 1007, provinceMileage: 2900, outProvinceMileage: 1100 },
    { driverId: 1008, provinceMileage: 3500, outProvinceMileage: 500 },
    { driverId: 1009, provinceMileage: 2800, outProvinceMileage: 1200 },
    { driverId: 1010, provinceMileage: 3200, outProvinceMileage: 800 },
  ],
  '2024-03': [
    { driverId: 1001, provinceMileage: 2900, outProvinceMileage: 1100 },
    { driverId: 1002, provinceMileage: 3300, outProvinceMileage: 700 },
    { driverId: 1003, provinceMileage: 2600, outProvinceMileage: 1400 },
    { driverId: 1004, provinceMileage: 3400, outProvinceMileage: 800 },
    { driverId: 1005, provinceMileage: 3000, outProvinceMileage: 1000 },
    { driverId: 1006, provinceMileage: 3200, outProvinceMileage: 800 },
    { driverId: 1007, provinceMileage: 2800, outProvinceMileage: 1200 },
    { driverId: 1008, provinceMileage: 3400, outProvinceMileage: 600 },
    { driverId: 1009, provinceMileage: 2700, outProvinceMileage: 1300 },
    { driverId: 1010, provinceMileage: 3100, outProvinceMileage: 900 },
    { driverId: 1011, provinceMileage: 2950, outProvinceMileage: 1050 },
    { driverId: 1012, provinceMileage: 3250, outProvinceMileage: 750 },
  ],

  // 2025年数据（当前年份）
  '2025-01': [
    { driverId: 1001, provinceMileage: 3000, outProvinceMileage: 1100 },
    { driverId: 1002, provinceMileage: 3300, outProvinceMileage: 900 },
    { driverId: 1003, provinceMileage: 2700, outProvinceMileage: 1400 },
    { driverId: 1004, provinceMileage: 3500, outProvinceMileage: 1000 },
    { driverId: 1005, provinceMileage: 3100, outProvinceMileage: 1000 },
    { driverId: 1006, provinceMileage: 3200, outProvinceMileage: 800 },
    { driverId: 1007, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1008, provinceMileage: 3400, outProvinceMileage: 700 },
    { driverId: 1009, provinceMileage: 2800, outProvinceMileage: 1300 },
    { driverId: 1010, provinceMileage: 3200, outProvinceMileage: 900 },
    { driverId: 1011, provinceMileage: 3000, outProvinceMileage: 1100 },
    { driverId: 1012, provinceMileage: 3300, outProvinceMileage: 800 },
    { driverId: 1013, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1014, provinceMileage: 3400, outProvinceMileage: 700 },
    { driverId: 1015, provinceMileage: 2800, outProvinceMileage: 1300 },
  ],
  '2025-02': [
    { driverId: 1001, provinceMileage: 3100, outProvinceMileage: 1000 },
    { driverId: 1002, provinceMileage: 3400, outProvinceMileage: 800 },
    { driverId: 1003, provinceMileage: 2800, outProvinceMileage: 1300 },
    { driverId: 1004, provinceMileage: 3600, outProvinceMileage: 900 },
    { driverId: 1005, provinceMileage: 3200, outProvinceMileage: 900 },
    { driverId: 1006, provinceMileage: 3300, outProvinceMileage: 700 },
    { driverId: 1007, provinceMileage: 3000, outProvinceMileage: 1100 },
    { driverId: 1008, provinceMileage: 3500, outProvinceMileage: 600 },
    { driverId: 1009, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1010, provinceMileage: 3300, outProvinceMileage: 800 },
    { driverId: 1011, provinceMileage: 3100, outProvinceMileage: 1000 },
    { driverId: 1012, provinceMileage: 3400, outProvinceMileage: 700 },
  ],
  '2025-03': [
    { driverId: 1001, provinceMileage: 2950, outProvinceMileage: 1150 },
    { driverId: 1002, provinceMileage: 3250, outProvinceMileage: 950 },
    { driverId: 1003, provinceMileage: 2650, outProvinceMileage: 1450 },
    { driverId: 1004, provinceMileage: 3450, outProvinceMileage: 1050 },
    { driverId: 1005, provinceMileage: 3050, outProvinceMileage: 1050 },
    { driverId: 1006, provinceMileage: 3150, outProvinceMileage: 850 },
    { driverId: 1007, provinceMileage: 2850, outProvinceMileage: 1250 },
    { driverId: 1008, provinceMileage: 3350, outProvinceMileage: 750 },
    { driverId: 1009, provinceMileage: 2750, outProvinceMileage: 1350 },
    { driverId: 1010, provinceMileage: 3150, outProvinceMileage: 950 },
    { driverId: 1011, provinceMileage: 2950, outProvinceMileage: 1150 },
    { driverId: 1012, provinceMileage: 3250, outProvinceMileage: 850 },
    { driverId: 1013, provinceMileage: 2850, outProvinceMileage: 1250 },
    { driverId: 1014, provinceMileage: 3350, outProvinceMileage: 750 },
    { driverId: 1015, provinceMileage: 2750, outProvinceMileage: 1350 },
  ],
  '2025-04': [
    { driverId: 1001, provinceMileage: 3050, outProvinceMileage: 1050 },
    { driverId: 1002, provinceMileage: 3350, outProvinceMileage: 850 },
    { driverId: 1003, provinceMileage: 2750, outProvinceMileage: 1350 },
    { driverId: 1004, provinceMileage: 3550, outProvinceMileage: 950 },
    { driverId: 1005, provinceMileage: 3150, outProvinceMileage: 950 },
    { driverId: 1006, provinceMileage: 3250, outProvinceMileage: 750 },
    { driverId: 1007, provinceMileage: 2950, outProvinceMileage: 1150 },
    { driverId: 1008, provinceMileage: 3450, outProvinceMileage: 650 },
    { driverId: 1009, provinceMileage: 2850, outProvinceMileage: 1250 },
    { driverId: 1010, provinceMileage: 3250, outProvinceMileage: 850 },
  ],
  '2025-05': [
    { driverId: 1001, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1002, provinceMileage: 3200, outProvinceMileage: 1000 },
    { driverId: 1003, provinceMileage: 2600, outProvinceMileage: 1500 },
    { driverId: 1004, provinceMileage: 3400, outProvinceMileage: 1100 },
    { driverId: 1005, provinceMileage: 3000, outProvinceMileage: 1100 },
    { driverId: 1006, provinceMileage: 3100, outProvinceMileage: 900 },
    { driverId: 1007, provinceMileage: 2800, outProvinceMileage: 1300 },
    { driverId: 1008, provinceMileage: 3300, outProvinceMileage: 800 },
    { driverId: 1009, provinceMileage: 2700, outProvinceMileage: 1400 },
    { driverId: 1010, provinceMileage: 3100, outProvinceMileage: 1000 },
    { driverId: 1011, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1012, provinceMileage: 3200, outProvinceMileage: 900 },
  ],
  '2025-06': [
    { driverId: 1001, provinceMileage: 3150, outProvinceMileage: 950 },
    { driverId: 1002, provinceMileage: 3450, outProvinceMileage: 750 },
    { driverId: 1003, provinceMileage: 2850, outProvinceMileage: 1250 },
    { driverId: 1004, provinceMileage: 3650, outProvinceMileage: 850 },
    { driverId: 1005, provinceMileage: 3250, outProvinceMileage: 850 },
    { driverId: 1006, provinceMileage: 3350, outProvinceMileage: 650 },
    { driverId: 1007, provinceMileage: 3050, outProvinceMileage: 1050 },
    { driverId: 1008, provinceMileage: 3550, outProvinceMileage: 550 },
    { driverId: 1009, provinceMileage: 2950, outProvinceMileage: 1150 },
    { driverId: 1010, provinceMileage: 3350, outProvinceMileage: 750 },
  ],
  '2025-07': [
    { driverId: 1001, provinceMileage: 2850, outProvinceMileage: 1250 },
    { driverId: 1002, provinceMileage: 3150, outProvinceMileage: 1050 },
    { driverId: 1003, provinceMileage: 2550, outProvinceMileage: 1550 },
    { driverId: 1004, provinceMileage: 3350, outProvinceMileage: 1150 },
    { driverId: 1005, provinceMileage: 2950, outProvinceMileage: 1150 },
    { driverId: 1006, provinceMileage: 3050, outProvinceMileage: 950 },
    { driverId: 1007, provinceMileage: 2750, outProvinceMileage: 1350 },
    { driverId: 1008, provinceMileage: 3250, outProvinceMileage: 850 },
    { driverId: 1009, provinceMileage: 2650, outProvinceMileage: 1450 },
    { driverId: 1010, provinceMileage: 3050, outProvinceMileage: 1050 },
    { driverId: 1011, provinceMileage: 2850, outProvinceMileage: 1250 },
    { driverId: 1012, provinceMileage: 3150, outProvinceMileage: 1050 },
  ],
  '2025-08': [
    { driverId: 1001, provinceMileage: 3000, outProvinceMileage: 1100 },
    { driverId: 1002, provinceMileage: 3300, outProvinceMileage: 900 },
    { driverId: 1003, provinceMileage: 2700, outProvinceMileage: 1400 },
    { driverId: 1004, provinceMileage: 3500, outProvinceMileage: 1000 },
    { driverId: 1005, provinceMileage: 3100, outProvinceMileage: 1000 },
    { driverId: 1006, provinceMileage: 3200, outProvinceMileage: 800 },
    { driverId: 1007, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1008, provinceMileage: 3400, outProvinceMileage: 700 },
    { driverId: 1009, provinceMileage: 2800, outProvinceMileage: 1300 },
    { driverId: 1010, provinceMileage: 3200, outProvinceMileage: 900 },
    { driverId: 1011, provinceMileage: 3000, outProvinceMileage: 1100 },
    { driverId: 1012, provinceMileage: 3300, outProvinceMileage: 800 },
  ],
  '2025-09': [
    { driverId: 1001, provinceMileage: 2950, outProvinceMileage: 1150 },
    { driverId: 1002, provinceMileage: 3250, outProvinceMileage: 950 },
    { driverId: 1003, provinceMileage: 2650, outProvinceMileage: 1450 },
    { driverId: 1004, provinceMileage: 3450, outProvinceMileage: 1050 },
    { driverId: 1005, provinceMileage: 3050, outProvinceMileage: 1050 },
    { driverId: 1006, provinceMileage: 3150, outProvinceMileage: 850 },
    { driverId: 1007, provinceMileage: 2850, outProvinceMileage: 1250 },
    { driverId: 1008, provinceMileage: 3350, outProvinceMileage: 750 },
    { driverId: 1009, provinceMileage: 2750, outProvinceMileage: 1350 },
    { driverId: 1010, provinceMileage: 3150, outProvinceMileage: 950 },
  ],
  '2025-10': [
    { driverId: 1001, provinceMileage: 3100, outProvinceMileage: 1000 },
    { driverId: 1002, provinceMileage: 3400, outProvinceMileage: 800 },
    { driverId: 1003, provinceMileage: 2800, outProvinceMileage: 1300 },
    { driverId: 1004, provinceMileage: 3600, outProvinceMileage: 900 },
    { driverId: 1005, provinceMileage: 3200, outProvinceMileage: 900 },
    { driverId: 1006, provinceMileage: 3300, outProvinceMileage: 700 },
    { driverId: 1007, provinceMileage: 3000, outProvinceMileage: 1100 },
    { driverId: 1008, provinceMileage: 3500, outProvinceMileage: 600 },
    { driverId: 1009, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1010, provinceMileage: 3300, outProvinceMileage: 800 },
    { driverId: 1011, provinceMileage: 3100, outProvinceMileage: 1000 },
    { driverId: 1012, provinceMileage: 3400, outProvinceMileage: 700 },
    { driverId: 1013, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1014, provinceMileage: 3400, outProvinceMileage: 700 },
    { driverId: 1015, provinceMileage: 2800, outProvinceMileage: 1300 },
  ],
  '2025-11': [
    { driverId: 1001, provinceMileage: 2800, outProvinceMileage: 1300 },
    { driverId: 1002, provinceMileage: 3100, outProvinceMileage: 1100 },
    { driverId: 1003, provinceMileage: 2500, outProvinceMileage: 1600 },
    { driverId: 1004, provinceMileage: 3300, outProvinceMileage: 1200 },
    { driverId: 1005, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1006, provinceMileage: 3000, outProvinceMileage: 1000 },
    { driverId: 1007, provinceMileage: 2700, outProvinceMileage: 1400 },
    { driverId: 1008, provinceMileage: 3200, outProvinceMileage: 900 },
    { driverId: 1009, provinceMileage: 2600, outProvinceMileage: 1500 },
    { driverId: 1010, provinceMileage: 3000, outProvinceMileage: 1100 },
  ],
  '2025-12': [
    { driverId: 1001, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1002, provinceMileage: 3200, outProvinceMileage: 1000 },
    { driverId: 1003, provinceMileage: 2600, outProvinceMileage: 1500 },
    { driverId: 1004, provinceMileage: 3400, outProvinceMileage: 1100 },
    { driverId: 1005, provinceMileage: 3000, outProvinceMileage: 1100 },
    { driverId: 1006, provinceMileage: 3100, outProvinceMileage: 900 },
    { driverId: 1007, provinceMileage: 2800, outProvinceMileage: 1300 },
    { driverId: 1008, provinceMileage: 3300, outProvinceMileage: 800 },
    { driverId: 1009, provinceMileage: 2700, outProvinceMileage: 1400 },
    { driverId: 1010, provinceMileage: 3100, outProvinceMileage: 1000 },
    { driverId: 1011, provinceMileage: 2900, outProvinceMileage: 1200 },
    { driverId: 1012, provinceMileage: 3200, outProvinceMileage: 1000 },
  ],
};

// 补贴标准（元/公里）
export const subsidyStandards = {
  provinceSubsidyRate: 0.8, // 省内补贴标准
  outProvinceSubsidyRate: 1.2, // 省外补贴标准
};
